import request from '@/utils/request'

export function getDepartmentList(query) {
  return request({
    url: '/mechanism/department/getList',
    method: 'post',
    data: query
  })
}

export function getDepartmentUsable(query) {
  return request({
    url: '/mechanism/department/getAvailable',
    method: 'post',
    data: query
  })
}

export function getDepartmentDetail(id) {
  return request({
    url: '/mechanism/department/getDetail',
    method: 'post',
    data: id 
  })
}

export function saveDepartment(id) {
  return request({
    url: '/mechanism/department/save',
    method: 'post',
    data: id
  })
}

export function removeDepartmentByID(id) {
  return request({
    url: '/mechanism/department/delete',
    method: 'post',
    data: id
  })
}

export function changeDepartmentStatusByID(id) {
  return request({
    url: '/mechanism/department/change-status',
    method: 'post',
    data: id 
  })
}

